#!/bin/sh
#
# 简单写一下脚本的功能。
#
#
#

if [ $# -ne 4 ]; then
	echo "Usage: $0 desc link value"
	exit
fi

goodsfile=/Users/hbaolong/workshop/gitee/goods/data/goods.md

today=`date |sed -e "s/日.*/日/g" |sed -e "s/ //g"`

echo $today

counter=`grep "^$today" $goodsfile |wc |awk '{print $1}'`

if [ $counter -lt 6 ]; then
	echo $today $1 $2 $3 $4 >>$goodsfile
else
	echo "alread 6 goods at "$today "."
fi
